// 编写好规则
// import mycore from '@/utils/my-core.js'
// const validateIdCaed = (rule, value, callback) => {
//   if (value === '') {
//     callback(new Error('请填写你的身份证号码~'))
//   } else if (!mycore.IdentityCodeValid(value)) {
//     callback(new Error('身份证号码格式不正确!'))
//   } else {
//     callback()
//   }
// }
export const rules = {
  doctor_name: [
    {
      required: true,
      message: '请填写你的名字~',
      trigger: 'blur'
    }
  ],
  job: [
    {
      required: true,
      message: '请填写你的职位',
      trigger: 'blur'
    },
    {
      pattern: /^[a-z0-9]{8,}$/,
      message: '用户名必须是8位以上的字母或者数字~',
      trigger: 'blur'
    }
  ],
  items_id: [
    {
      required: true,
      message: '请选择你负责的疾病~',
      trigger: 'change'
    }
  ],
  // id_card: [{ validator: validateIdCaed, trigger: 'blur' }],
  service_price: [
    {
      required: true,
      message: '请输入您的诊费~',
      trigger: 'blur'
    }
  ],
  be_good_at: [
    {
      required: true,
      message: '请填写您擅长医治的疾病~',
      trigger: 'blur'
    }
  ],
  desc: [
    {
      required: true,
      message: '请填写您的个人简介~',
      trigger: 'blur'
    }
  ]
}
